package com.ruoyi.qiushi.service.system.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.qiushi.domain.system.QiushiMessage;
import com.ruoyi.qiushi.mapper.system.QiushiMessageMapper;
import com.ruoyi.qiushi.service.system.IQiushiMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 消息管理Service业务层处理
 *
 * @author ruoyi
 * @date 2023-12-27
 */
@Service
public class QiushiMessageServiceImpl implements IQiushiMessageService {
    @Autowired
    private QiushiMessageMapper qiushiMessageMapper;

    /**
     * 查询消息管理
     *
     * @param id 消息管理主键
     * @return 消息管理
     */
    @Override
    public QiushiMessage selectQiushiMessageById(Long id) {
        return qiushiMessageMapper.selectQiushiMessageById(id);
    }

    /**
     * 查询消息管理列表
     *
     * @param qiushiMessage 消息管理
     * @return 消息管理
     */
    @Override
    public List<QiushiMessage> selectQiushiMessageList(QiushiMessage qiushiMessage) {



        return qiushiMessageMapper.selectQiushiMessageList(qiushiMessage);
    }

    /**
     * 新增消息管理
     *
     * @param qiushiMessage 消息管理
     * @return 结果
     */
    @Override
    public int insertQiushiMessage(QiushiMessage qiushiMessage) {
        qiushiMessage.setCreateTime(DateUtils.getNowDate());
        return qiushiMessageMapper.insertQiushiMessage(qiushiMessage);
    }

    /**
     * 修改消息管理
     *
     * @param qiushiMessage 消息管理
     * @return 结果
     */
    @Override
    public int updateQiushiMessage(QiushiMessage qiushiMessage) {
        qiushiMessage.setUpdateTime(DateUtils.getNowDate());
        return qiushiMessageMapper.updateQiushiMessage(qiushiMessage);
    }

    /**
     * 删除消息管理信息
     *
     * @param id 消息管理主键
     * @return 结果
     */
    @Override
    public int deleteQiushiMessageById(Long id) {
        return qiushiMessageMapper.deleteQiushiMessageById(id);
    }
}
